<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			#idWorkContent{
				display: flex;
				align-items: center;
			}
			#idAddWork{
				display: flex;
				justify-content: flex-end;
			}
		</style>
	</head>
	<body>
		<div id="div1">
			<h3>工作经历</h3>
			<hr >
			
			<div id="workAll">
				<!-- 公司名称：<input type="" name="" id="" value="" />
				职位：<input type="" name="" id="" value="" />
				<a href="#" onclick="delwork(event);">删除工作经历</a>
				<br /><br />
				<div id="idWorkContent">
					工作职责及工作内容描述:<textarea rows="8" cols="100"></textarea>
				</div>
				<hr > -->
			</div>
			
			<div id="idAddWork">
				<a href="#" onclick="addwork();">添加工作经历</a>
			</div>
			
		</div>
		
	</body>
	<script type="text/javascript">
		function delwork(event){
			var workAllObj = document.getElementById('workAll');
			var delTarget = event.target.parentElement;
			workAllObj.removeChild(delTarget)
		}
		function addwork(){
			var workAllObj = document.getElementById('workAll');
			var newDiv = document.createElement('div')
			newDiv.innerHTML = `公司名称：<input type="" name="" id="" value="" />
				职位：<input type="" name="" id="" value="" />
				<a href="#" onclick="delwork(event);">删除工作经历</a>
				<br /><br />
				<div id="idWorkContent">
					工作职责及工作内容描述:<textarea rows="8" cols="100"></textarea>
				</div>
				<hr >`;
			workAllObj.appendChild(newDiv);
			
		}
		
	</script>
</html>
